package com.kx.springmybatis.controller;

import com.kx.springmybatis.pojo.User;
import com.kx.springmybatis.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @ClassName UserServlet
 * @Author Sun
 * @Date 2021/5/17 20:18
 */
@Controller
public class UserServlet {
    @Autowired
    private UserService userService;

    public User getUser() {
        User user = userService.findUserById(1);
        return user;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }
}
